<?php
	class MenuWidget extends CWidget{
		public function run()
		{
			$this->getMenu();
		}
		protected function getMenu()
		{
			//Get Menu from Menu table with type = 1 (Status = 1 is Active)
			$menu = Menu::model()->findAllByAttributes(array('type' => 1));
			//get server time
			$time = date('H:i',time() + 3600);
			// Load the template in Component/View directory.
			$this->render('menu',array('menu' => $menu,'time' => $time));
		}
	}
 ?>